package ytdp.careagle.com.ytdp.myview;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.FrameLayout;

import ytdp.careagle.com.ytdp.app.APP;

/**
 * Created by admin on 2017/10/24.
 */

public class PressFragment extends FrameLayout {
    public PressFragment(@NonNull Context context) {
        super(context);
    }

    public PressFragment(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        switch (ev.getActionMasked()) {
            case MotionEvent.ACTION_DOWN:
                APP.getInstance().resetCountDown();
                break;
            default:
                break;
        }
        return super.dispatchTouchEvent(ev);
    }

}
